.message {
  text-align: left;
  .sender-space {
    width: 28px;
    margin-right: 8px;
    display: flex;
    justify-content: flex-end;
    .sender-head,
    .app_icon {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background-color: var(--grey-background);
      background-size: cover;
      background-position: center;
    }
  }
  .message-content {
    flex: 1;
    min-width: 0;
    width: 0;

    &.link-to-thread {
      color: var(--grey-dark);
      .content-parent {
        &:before {
          content: '';
          position: absolute;
          left: 0px;
          height: 100%;
          width: 3px;
          border-radius: 2px;
          background: var(--grey-light);
        }
        position: relative;
        padding-left: 8px;
      }
      .sender-status {
        display: none;
      }
    }

    .message-content-header {
      position: relative;
      display: inline-block;
      overflow: hidden;
      white-space: nowrap;
      display: flex;
      flex-direction: row;
      justify-content: flex-start;
      align-items: baseline;

      .sender-name {
        font-weight: 700;
        margin-right: 4px;
        cursor: pointer;
      }
      .sender-status {
        font-size: 12px;
        color: var(--grey-dark);
        margin-right: 4px;
      }
      .reply-text {
        margin-right: 4px;
        a,
        a * {
          display: inline;
        }
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .date {
        color: var(--grey-dark);
        font-size: 12px;
        &:hover {
          text-decoration: underline;
        }
      }
    }
  }

  .message-options {
    position: absolute;
    background-color: var(--white);
    height: 28px;
    border-radius: 14px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid var(--grey-background);
    display: block;
    top: 12px;
    margin: auto;
    right: 8px;
    z-index: 1;
    opacity: 0;
    display: flex;
    flex-direction: row;
    transition: opacity 0.2s;

    &.drag {
      left: -8px;
      right: unset;
      display: none;

      .option,
      .option:hover {
        min-width: 28px;
        color: var(--primary);
        cursor: grab;
      }
    }

    .option {
      &:not(:last-child) {
        border-right: 1px solid var(--grey-background);
      }
      min-width: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--grey-dark);
      cursor: pointer;
      &:hover {
        color: var(--black);
      }
    }
  }
  .message-content.active {
    .message-options.right {
      opacity: 1;
    }
  }
  &:hover {
    .message-options {
      opacity: 1;
      transition-delay: 0.2s;
    }
  }

  .message-content.loading-interaction {
    opacity: 0.5;
    pointer-events: none;
  }

  .reactions {
    margin-top: 8px;

    .reaction_container {
      width: auto;
      display: inline-block;
    }

    .reaction {
      display: inline-flex;
      justify-content: center;
      align-items: center;
      margin-right: 4px;
      border-radius: var(--default-border-radius);
      box-sizing: border-box;
      color: var(--black);
      height: 24px;
      min-width: 36px;
      border: 0;
      padding: 3px 4px;
      font-size: 14px;
      line-height: 16px;
      border: 1px solid var(--grey-background);
      font-weight: 500;
      cursor: pointer;

      .emoji-container {
        margin-right: 4px;
        line-height: 0px;
      }

      &.is_selected {
        border: 1px solid var(--primary);
        color: var(--primary);
        background: var(--white);
      }

      &:hover {
        background: var(--primary-background);
      }
    }
  }
}

body:not(.drag_message) {
  .draggable {
    .message-options.drag {
      display: flex;
    }
  }
}
